/* 基础与主题色 */
:root {
  --bg: #0e0f11;
  --panel: #1a1d21;
  --panel-2: #14171a;
  --gold: #c9a44b;
  --gold-2: #e6c676;
  --accent: #2e7d32;
  --text: #e6e6e6;
  --muted: #9aa0a6;
  --shadow: 0 6px 24px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.03);
}

html, body {
  height: 100%;
  background: radial-gradient(1200px 800px at 20% 10%, #17191d 0%, #0b0c0e 60%, #060708 100%), var(--bg);
  color: var(--text);
  margin: 0;
  font-family: 'Noto Sans SC', system-ui, -apple-system, Segoe UI, Roboto, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 顶部页签 */
.char-tabs {
  display: flex;
  gap: 8px;
  padding: 10px 12px 0 12px;
}
.char-tabs .tab {
  background: linear-gradient(180deg, #2b2f35, #1a1e22);
  color: #cfd3d7;
  border: 1px solid rgba(0,0,0,0.6);
  border-bottom-color: rgba(0,0,0,0.9);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05), 0 2px 6px rgba(0,0,0,0.4);
  padding: 6px 14px;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
}
.char-tabs .tab.active {
  background: linear-gradient(180deg, #3b66a8, #1b3155);
  color: #e9f0ff;
  border-color: rgba(39,79,135,0.8);
}

/* 屏幕主容器：左右结构，无滚动，通过自适应缩放 */
.char-screen {
  height: 100vh;
  max-height: 100vh;
  display: grid;
  grid-template-columns: 1fr clamp(280px, 30vw, 420px);
  gap: clamp(12px, 2vw, 20px);
  padding: clamp(8px, 1.8vw, 18px);
  box-sizing: border-box;
}

/* 中央人物与装备区：三列（左装备 | 人像 | 右装备） */
.char-panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(0,0,0,0.25)) , var(--panel);
  border: 1px solid rgba(201,164,75,0.28);
  box-shadow: var(--shadow);
  border-radius: 12px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  justify-items: center;
  padding: clamp(8px, 1.6vw, 16px);
  position: relative;
  overflow: hidden;
}

.char-panel:before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 280px at 50% 0%, rgba(230,198,118,0.08), transparent 60%);
  pointer-events: none;
}

/* 装备列：竖直等距分布，方形槽位 */
.equip-column {
  display: grid;
  gap: clamp(8px, 1.2vw, 14px);
}

.equip-slot {
  width: clamp(44px, 6.5vw, 64px);
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(0,0,0,0.4)), var(--panel-2);
  border: 1px solid rgba(201,164,75,0.4);
  box-shadow: inset 0 0 0 2px rgba(0,0,0,0.35), 0 2px 8px rgba(0,0,0,0.35);
  position: relative;
}

.equip-slot::after {
  /* 小型角标，提示槽位存在 */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(230,198,118,0.15);
  pointer-events: none;
}

.equip-slot:hover {
  border-color: var(--gold-2);
  box-shadow: inset 0 0 0 2px rgba(230,198,118,0.35), 0 4px 14px rgba(230,198,118,0.15);
}

/* 人物缩略图区域 */
.char-portrait {
  width: min(36vw, 520px);
  max-width: 520px;
  aspect-ratio: 3 / 4;
  display: grid;
  place-items: center;
}

.portrait-frame {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(0,0,0,0.25)), #0c0e10;
  border: 1px solid rgba(201,164,75,0.35);
  border-radius: 12px;
  box-shadow: inset 0 0 0 2px rgba(0,0,0,0.45), 0 8px 28px rgba(0,0,0,0.55);
  padding: clamp(8px, 1.6vw, 16px);
  box-sizing: border-box;
  display: grid;
  place-items: center;
}

.portrait-img {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.2), rgba(0,0,0,0.6)),
    radial-gradient(220px 120px at 55% 25%, rgba(46,125,50,0.25), transparent 65%),
    url('data:image/svg+xml;utf8,\
      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 400">\
        <defs>\
          <linearGradient id="g" x1="0" y1="0" x2="0" y2="1">\
            <stop offset="0%" stop-color="%23232b30"/>\
            <stop offset="100%" stop-color="%23131a1e"/>\
          </linearGradient>\
        </defs>\
        <rect width="300" height="400" fill="url(%23g)"/>\
        <circle cx="150" cy="150" r="70" fill="%233c4a52"/>\
        <rect x="90" y="210" width="120" height="140" rx="12" fill="%23334046"/>\
      </svg>') center/cover no-repeat;
  border: 1px solid rgba(201,164,75,0.28);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}

/* 右侧属性面板 */
.attr-panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.35)), var(--panel);
  border: 1px solid rgba(201,164,75,0.28);
  box-shadow: var(--shadow);
  border-radius: 12px;
  padding: clamp(10px, 1.8vw, 18px);
  display: grid;
  grid-template-columns: auto 1fr;
  grid-auto-rows: auto;
  gap: clamp(8px, 1.4vw, 16px);
  align-content: start;
  min-width: 260px;
}

/* 右侧属性面板 - 左侧竖向图标列 */
.attr-side-list {
  grid-row: 1 / span 3;
  display: grid;
  gap: 10px;
  margin-right: 10px;
}
.attr-slot {
  width: clamp(40px, 5.6vw, 56px);
  aspect-ratio: 1/1;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(0,0,0,0.4)), var(--panel-2);
  border: 1px solid rgba(0,0,0,0.6);
  box-shadow: inset 0 0 0 2px rgba(0,0,0,0.35), 0 2px 8px rgba(0,0,0,0.35);
}

/* 稀有度颜色框 */
.rarity-epic { box-shadow: inset 0 0 0 2px rgba(165,139,255,0.65), 0 0 10px rgba(165,139,255,0.25); }
.rarity-rare { box-shadow: inset 0 0 0 2px rgba(74,163,255,0.65), 0 0 10px rgba(74,163,255,0.25); }
.rarity-uncommon { box-shadow: inset 0 0 0 2px rgba(59,178,115,0.65), 0 0 10px rgba(59,178,115,0.25); }
.rarity-common { box-shadow: inset 0 0 0 2px rgba(154,160,166,0.65), 0 0 10px rgba(154,160,166,0.25); }

.attr-section h2 {
  margin: 0 0 8px 0;
  font-size: clamp(13px, 1.6vw, 16px);
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #e7e0cf;
  text-shadow: 0 1px 0 rgba(0,0,0,0.8);
  position: relative;
  display: inline-block;
  padding: 6px 16px;
  background: linear-gradient(180deg, #2b2a28, #171614);
  border: 1px solid #3b3426;
  border-radius: 4px;
}

.attr-section ul {
  list-style: none;
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.25)), var(--panel-2);
  border: 1px solid rgba(201,164,75,0.18);
}

.attr-section li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(201,164,75,0.18);
}

.attr-section li:last-child { border-bottom: none; }

.attr-section .label {
  color: var(--muted);
  font-size: clamp(12px, 1.5vw, 14px);
}

.attr-section .value {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.2px;
  min-width: 60px;
  text-align: right;
}

/* 响应：小屏时属性面板也能与人物等高，无滚动 */
@media (max-width: 960px) {
  .char-screen {
    grid-template-columns: 1fr clamp(240px, 36vw, 360px);
  }
}

@media (max-width: 760px) {
  .char-screen {
    grid-template-columns: 1fr; /* 堆叠 */
  }
  .attr-panel {
    min-width: unset;
    order: 2;
    grid-template-columns: 1fr; /* 侧栏在小屏上自动隐藏 */
  }
  .char-panel {
    order: 1;
  }
  .char-portrait { width: min(72vw, 520px); }
}

/* 底部铭牌与箭头 */
.char-footer {
  margin: 8px 12px 12px 12px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}
.foot-plaque {
  justify-self: center;
  padding: 8px 18px;
  background: linear-gradient(180deg, #2b2a28, #171614);
  border: 1px solid #3b3426;
  border-radius: 8px;
  color: #e7e0cf;
}
.foot-arrow {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid #3b3426;
  background: linear-gradient(180deg, #2b2f35, #1a1e22);
  position: relative;
}
.foot-arrow:before {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 8px; height: 8px;
  border-top: 2px solid #cfd3d7;
  border-left: 2px solid #cfd3d7;
  transform: rotate(-45deg);
}
.foot-arrow.right:before { transform: rotate(135deg); }


